home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / tools / czesc_2 / man3.801 / install < prev    next >
Text File  |  1995-05-17  |  5KB  |  157 lines

  1. ;  *** Man installation scipt ***
  2.  
  3. (set #install-msg
  4. (cat "\n\nMan installation script.\n"
  5.      "This script installs the MAN commodity on your Amiga.\n\n"
  6.      "Read the documentation for\n"
  7.      "more information on the distribution\n"
  8.      "and commercial usage of Man.\n\n"
  9.      "Man © 1993-1995 Markus Hillenbrand\n"
  10.      "All rights reserved."
  11. ))
  12.  
  13. (set #bad-kick         "You must be using Kickstart 2.04 to install using this script!")
  14. (set #copying-reqtools "Copying reqtools.library to Libs:...")
  15.  
  16. (message #install-msg)
  17. (welcome "Welcome to the Man installation!")
  18.  
  19. (if (< (/ (getversion) 65536) 37)
  20. (
  21.     (abort #bad-kick)
  22. ))    
  23.  
  24. (set cputype (+(database "CPU")))
  25.  
  26. (if (>= cputype 68020)
  27.     (set MANFILE "Man_020")
  28.     (set MANFILE "Man")
  29. )
  30.  
  31. (if (exists "S:Man.cfg")
  32. (
  33.     (delete "S:Man.cfg")
  34. ))
  35.  
  36. (set reqtoolslib "libs20/reqtools.library")
  37. (set catalogdir  "catalogs/")
  38.  
  39. (copylib
  40.         (prompt "\n" #copying-reqtools)
  41.         (help @copylib-help)
  42.         (source reqtoolslib)
  43.         (dest "Libs:")
  44.         (confirm)
  45.  
  46. (if (exists "SYS:WBStartUp/Man") (copylib   (prompt "\nInstalling Man-Commodity\n")
  47.                                   (help @copylib-help)
  48.                          (source MANFILE)
  49.                         (newname "Man")
  50.                              (dest "SYS:WBStartUp")
  51.                              (confirm))
  52.                  (copyfiles (prompt "\nInstalling Man-Commodity\n")
  53.                                             (help @copyfile-help)
  54.                                             (source MANFILE)
  55.                         (newname "Man")
  56.                                             (dest "SYS:WBStartUp")
  57.                                             (infos)
  58.                                             (noposition)
  59.                                             (confirm))
  60. )
  61.  
  62. (set #which-language "\nWhich languages should be installed?\n(English is default.)") 
  63. (set old_level @user-level)
  64. (set default_lang 1)
  65.  
  66. (if (exists "SYS:Locale")
  67. (
  68.     (if (exists "LOCALE:")
  69.         (
  70.         (user 1)
  71.         (set lang (askoptions (prompt #which-language)
  72.                               (help   #which-language-help)
  73.                               (choices    "Deutsch"
  74.                                           "Svenska")
  75.                               (default default_lang)
  76.                   )
  77.         )
  78.         (user old_level)
  79.         (set n 0)
  80.         (while (set language (select n "deutsch"
  81.                                        "svenska"
  82.                                        ""))
  83.            (
  84.            (if (IN lang n)
  85.                (
  86.                (if (<> 2 n)
  87.                    (
  88.                    (makedir (cat "LOCALE:Catalogs/" language))
  89.                    (copyfiles (source (cat catalogdir language))
  90.                               (dest (cat "LOCALE:Catalogs/" language))
  91.                               (all)
  92.                    )
  93.                ))
  94.               ))
  95.            (set n (+ n 1))
  96.         ))
  97.      ))
  98. ))
  99.  
  100. (set #which-manpages "\nWhich man pages should be installed?") 
  101. (set #which-manhelp  "Specify the useful man pages")
  102. (set old_level @user-level)
  103. (set manpagedir "Pages/")
  104.  
  105. (
  106.    ;get destination dir for ManPages
  107.    (set mydest
  108.         (askdir
  109.                (prompt "Select the directory where you want to put the man pages:")
  110.                (help   "The directory where you store the man pages should be on a "
  111.                        "hard drive. A directory will NOT be created!!\n\n"
  112.                )
  113.                (default "Work:")
  114.                (disk)
  115.         )
  116.    )
  117.  
  118.    (user 1)
  119.    (set lang (askoptions (prompt #which-manpages)
  120.                          (help   #which-manhelp)
  121.                          (choices  "Man"
  122.                                    "Dir"
  123.                                    "DT2IFF"
  124.                                    "List"
  125.                    "Size"
  126.                    "Wait"
  127.                                    "Which"
  128.                                    "Why")
  129.              )
  130.         )
  131.         (user old_level)
  132.         (set n 0)
  133.         (while (set manpage (select n "Man.man"
  134.                                       "Dir.man"
  135.                                       "DT2IFF.man"
  136.                                       "List.man"
  137.                                       "Size.man"
  138.                       "Wait.man"
  139.                                       "Which.man"
  140.                                       "Why.man"
  141.                                       ""))
  142.         (
  143.         (if (IN lang n)
  144.             (
  145.             (if (<> 200 n)
  146.                 (
  147.                 (copyfiles (source (cat manpagedir manpage))
  148.                            (dest mydest)
  149.                            (all)
  150.                            )
  151.                 ))
  152.             ))
  153.         (set n (+ n 1))
  154.     ))
  155. )
  156.